#ifndef _POINTLIGHTSHADOWRENDERPASS_H_
#define _POINTLIGHTSHADOWRENDERPASS_H_

#include <SERender/Renderer/RenderPass/RenderPass.h>
#include <memory>
#include <SERender/Resourses/FrameBuffer.h>
#include <SEngine/Render/Entity/Model.h>
#include <SERender/Entity/Camera.h>
#include <SERender/Entity/Drawable.h>
#include <SERender/Resourses/Material.h>
#include <SERender/Resourses/ShadowMap.h>
#include <SEngine/Util/RenderPassGUIHandler.h>

namespace SEngine
{
    class PointLightShadowRenderPass : public RenderPass, public RenderPassGUIHandler
    {
    public:
        PointLightShadowRenderPass(Renderer & renderer);
        virtual ~PointLightShadowRenderPass() = default;
        virtual void BeginFrame() override;
        virtual void DrawFrame() override;
        virtual void EndFrame() override {}
    private:
        std::unique_ptr<FrameBuffer> m_fbo;
        std::shared_ptr<Texture> m_lightDepthTex;
        ResRef<Material> m_cubeDepthMaterial;
        ResRef<Material> m_cubeDepthShadowMaterial;

        float m_samples{1.0f};
        float m_bias{0.05f};

    };
} // namespace SEngine


#endif